package Demo2;

public class Test {
    public static void main(String[] args) {
        Duck duck1 = new Duck("xiaoya",2);
        Duck duck2 = new Duck("xiaoya",2);
        System.out.println(duck1.equals(duck2));
        System.out.println(duck1.hashCode());
        System.out.println(duck2.hashCode());
    }
}
